package com.bw.ppjokeplay.adapter

import android.os.Parcel
import android.os.Parcelable
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentStatePagerAdapter

/**
 * @author Lishaohe
 * @description:
 * @date :2021/11/12 0012 上午 10:14
 *
 */
class MyvpAdapter(fragmentManager: FragmentManager) : FragmentStatePagerAdapter(fragmentManager) {

        var string = ArrayList<String>()
        var fragment = ArrayList<Fragment>()


    override fun getCount(): Int {
        return fragment!!.size
    }

    override fun getItem(position: Int): Fragment {
       return fragment.get(position)
    }

    override fun getPageTitle(position: Int): CharSequence? {
        return string.get(position)
    }

}